<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Administrator
 * Date: 13-10-30
 * Time: 上午10:34
 */

include '../common/autoload.php';

$parent_id = 108;
$blg = 277 ;
$son_id = 294;

//$sql = "SELECT * FROM pft_p_apply_evolute WHERE sid=277 AND fid=108";
$sql = "select * from pft_ips_rec";
$GLOBALS['le']->query($sql);
$arr = array();
while($r = $GLOBALS['le']->fetch_assoc()) {
    $arr[] = $r;
}

print_r($arr);
//$sql = "SELECT * FROM pft_p_apply_evolute WHERE pid IN(".implode(',', $arr).") AND sid=294";
//$GLOBALS['le']->query($sql);
//$arr2 = array();
//while($r = $GLOBALS['le']->fetch_assoc()) {
//    $arr2[] = $r['pid'];
//}
//print_r($arr2);

//$GLOBALS['le']->query('DELETE FROM pft_p_apply_evolute WHERE sid=108 AND fid=294');
//$sql = "DELETE FROM pft_p_apply_evolute WHERE (".
//    "aids like '$parent_id,$son_id%' OR aids like '%,$parent_id,$son_id')";